package com.topone.Utils;


import org.apache.commons.lang3.StringUtils;

public class HidePhoneUntil {

    public static  String hidePhone(String phone){

        if(StringUtils.isNotEmpty(phone) && phone.length()>4){
            String phoneNumber = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
            return phoneNumber;
        }else{
            return phone;
        }
    }
}
